/*
 * The main activity. Listens for clicks on buttons, running corresponding 	activityes.
 */
package org.amse.ys.sndeditor.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import org.amse.ys.sndeditor.model.editor.ImplementedEditor;

public class MainActivity extends Activity {
	public MainActivity myLinkToMe;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		ImplementedEditor.initEditor(this);
		// Localiser.init(this);
		setContentView(R.layout.main_activity);
		myLinkToMe = this;

		final ImageButton openButton = (ImageButton) findViewById(R.id.open_button);
		openButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				// running open dialog
				Intent intent = new Intent();
				intent.setClass(myLinkToMe, SoundOpenActivity.class);
				startActivity(intent);

			}
		});

		final ImageButton aboutButton = (ImageButton) findViewById(R.id.new_button);
		aboutButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				// TODO add about/record/.... window
				// throw new RuntimeException();
			}
		});

		/*
		 * Intent intent = new Intent(); intent.setClass(myLinkToMe,
		 * SoundOpenActivity.class); startActivity(intent); finish();
		 */

	}

}
